<?php
	include('dbconnect.php');
	require_once('class.Fitness.php');
	require_once('class.UserDB.php');
  	
	$fitness = new Fitness();
	$userDB = new UserDB();
    $xmlData = file_get_contents("http://www.ashkansotoudeh.com/blog/?feed=rss2");
	$xmlData = str_replace("content:encoded","content",$xmlData);
	$xmlData = str_replace("dc:creator","creator",$xmlData);
	$xml = new SimpleXMLElement($xmlData);
	$item = $xml->channel;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
	<link rel="Icon" href="favicon.ico" />
    <link rel="Stylesheet" type="text/css" media="screen" href="style.css" />
    <title><?php $config->displayHeader(); ?></title>
</head>
<body>
    <div id="header">
		<div id="navigation">
    	<a id="navitem" href="index.php">Home</a> |
    	<a id="navitem" href="codeSnippets.php">Code Snippets</a> |
		<a id="navitem" href="/blog">Blog</a> |
    	<a id="navitem" href="rss.php">RSS Feed</a> |
		<a id="navitem" href="about.php">About Me</a> |
		<?php if (!isset($_SESSION['fName'])) { ?>
			<a id="navitem" href="login.php">Login</a> |
		<?php } else { ?>
			<a id="navitem" href="admin.php">Admin</a>
		<?php } ?>
		</div>
		<h1 class="title"><a class="title" href="index.php"><?php $config->displayHeader(); ?></a></h1>
		<h3 class="quote"><?php $config->displayQuote(1); ?></h3>
	</div>
	
	<div id="sidebar">Recent Posts
		<div id="sidebardata">
		<?php
		foreach ($item->item as $post) {
			$postTitle = $post->title;
			echo "<a id='sidebardata' href='#$postTitle'>" . $postTitle . "</a><br \>";
		}
		?>
		</div>
	</div>
	<div id="sidebar2">Links
		<div id="sidebardata">
			<a id='sidebardata' href="http://cs.senecac.on.ca/">CS Seneca</a><br />
			<a id='sidebardata' href="http://my.senecacollege.ca/">My Seneca</a><br />
			<a id='sidebardata' href="https://learn.senecac.on.ca/">Learn Email</a><br />
			<a id='sidebardata' href="http://cdot.senecac.on.ca/">CDOT</a><br />
			<a id='sidebardata' href="http://webchat.freenode.net?channels=seneca&uio=d4">Freenode IRC</a>
		</div>
	</div>
    <div id="content">
		<?php
			if (isset($_POST['btn_Submit'])) {
				if($userDB->login($_POST['txtUser'],$_POST['txtPasswd'])) {
					$uinfo = $userDB->getUserInfo($_POST['txtUser']);
					$_SESSION['fName'] = $uinfo[3];
				}
			}
		?>
		<div id='heading'>About Me</div>
		<br />
		
		<?php
			echo nl2br("Greetings and Welcome to my site,
			
			A little about myself, I currently am in my 3rd Semester of CPA (Computer Programming &amp; Analysis) program at Seneca @ York.  
			The main purpose of this blog is to keep track of my progress in my two favourite passions, Computer Programming &amp; Fitness.  
			Specifically I will be covering information about my course OOP344 (Object Oriented Programming II Using C++) and my fitness progress with P90X/Insanity.
			
			Below is my current schedule at Seneca:
			
			<span class='postTitle'>Semester 3 Schedule (2011)</span>
			
			");
		?>
		<table border="1" cellspacing="1" cellpadding="3" width="50%">
<tbody>
<tr>
<td id="subheadbgl"></td>
<th id="subheadbgl">Monday</th>
<th id="subheadbgl">Tuesday</th>
<th id="subheadbgl">Wednesday</th>
<th id="subheadbgl">Thursday</th>
<th id="subheadbgl">Friday</th>
</tr>
<tr>
<td id="bold">8:00</td>
<td id="bold" align="center">-</td>
<td id="bold" align="center">-</td>
<td id="bold" align="center">-</td>
<td id="bold" bgcolor="#BDC6DE">OOP344B<br />
F. Soleimanloo<br />
T3135</td>
<td id="bold" align="center">-</td>
</tr>
<tr>
<td id="bold">8:55</td>
<td id="bold" align="center">-</td>
<td id="bold" align="center">-</td>
<td id="bold" align="center">-</td>
<td id="bold" bgcolor="#BDC6DE">OOP344B<br />
F. Soleimanloo<br />
T3135</td>
<td id="bold" align="center">-</td>
</tr>
<tr>
<td id="bold">9:50</td>
<td id="bold" bgcolor="#63C6DE">SYS366B<br />
M. Walton<br />
T3076</td>
<td id="bold" align="center">-</td>
<td id="bold" bgcolor="#63C6DE">SYS366B<br />
M. Walton<br />
T3076</td>
<td id="bold" bgcolor="#FFE7C6">DBS301B<br />
P. Belvedere<br />
T2109</td>
<td id="bold" bgcolor="#BDC6DE">OOP344B<br />
F. Soleimanloo<br />
S2157</td>
</tr>
<tr>
<td id="bold">10:45</td>
<td id="bold" bgcolor="#63C6DE">SYS366B<br />
M. Walton<br />
T3076</td>
<td id="bold" align="center">-</td>
<td id="bold" bgcolor="#63C6DE">SYS366B<br />
M. Walton<br />
T3076</td>
<td id="bold" bgcolor="#FFE7C6">DBS301B<br />
P. Belvedere<br />
T2109</td>
<td id="bold" bgcolor="#BDC6DE">OOP344B<br />
F. Soleimanloo<br />
S2157</td>
</tr>
<tr>
<td id="bold">11:40</td>
<td id="bold" bgcolor="#FFFF10">INT322B<br />
D. Abesdris<br />
T2109</td>
<td id="bold" align="center">-</td>
<td id="bold" align="center">-</td>
<td id="bold" bgcolor="#FF9C4A">CPP100H<br />
P. Harper<br />
T3079</td>
<td id="bold" bgcolor="#FFE7C6">DBS301AB<br />
P. Belvedere<br />
T4040</td>
</tr>
<tr>
<td id="bold">12:35</td>
<td id="bold" bgcolor="#FFFF10">INT322B<br />
D. Abesdris<br />
T2109</td>
<td id="bold" align="center">-</td>
<td id="bold" align="center">-</td>
<td id="bold" bgcolor="#FF9C4A">CPP100H<br />
P. Harper<br />
T3079</td>
<td id="bold" bgcolor="#FFE7C6">DBS301AB<br />
P. Belvedere<br />
T4040</td>
</tr>
<tr>
<td id="bold">13:30</td>
<td id="bold" align="center">-</td>
<td id="bold" align="center">-</td>
<td id="bold" align="center">-</td>
<td id="bold" align="center">-</td>
<td id="bold" align="center">-</td>
</tr>
<tr>
<td id="bold">14:25</td>
<td id="bold" align="center">-</td>
<td id="bold" align="center">-</td>
<td id="bold" align="center">-</td>
<td id="bold" align="center">-</td>
<td id="bold" align="center">-</td>
</tr>
<tr>
<td id="bold">15:20</td>
<td id="bold" align="center">-</td>
<td id="bold" align="center">-</td>
<td id="bold" align="center">-</td>
<td id="bold" align="center">-</td>
<td id="bold" bgcolor="#FFFF10">INT322B<br />
D. Abesdris<br />
S2152</td>
</tr>
<tr>
<td id="bold">16:15</td>
<td id="bold" align="center">-</td>
<td id="bold" align="center">-</td>
<td id="bold" align="center">-</td>
<td id="bold" align="center">-</td>
<td id="bold" bgcolor="#FFFF10">INT322B<br />
D. Abesdris<br />
S2152</td>
</tr>
</tbody>
</table>
	</div>
	<div id="footer">
    	<a href="#">About</a> - <a href="#">Contact Us</a> - <a href="#">Help</a>
    	<br />
    	<?php $config->displayFooter(); ?>
	</div>
</body>
</html>
